package DigitalNetwork;

import java.awt.Color;
import java.awt.Graphics;

public class GateView extends UnitView {

    /** [Konstruktor]
     * Hozzaadja a Unitot a View-hoz.
     */
	//==========================================================================
    public GateView(Unit u){
        super(u);
    }
    //==========================================================================

	/**
	 * 
	 * @param g
	 * @return 
	 */
    @Override
	public void draw(Graphics g) {
        // Keret es UnitID szine
        g.setColor(Color.BLACK);

        // Keret kirajzolasa
        g.drawRect(0, 0, NetworkView.UNIT_SIZE, NetworkView.UNIT_SIZE);
        g.drawString(this.unit.getID(), 2, NetworkView.UNIT_SIZE/2 - 5);
        g.drawString(this.unit.getType(), 2, NetworkView.UNIT_SIZE/2 + 15 );
    }

}